// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import Vuex from 'vuex'
import store from './store/index'
import vuexI18n from 'vuex-i18n'
import './assets/js/filter'
import router from './router'
import echarts from 'echarts'
// import './assets/js/globalEvent'

// Vue.use(Vuex);

Vue.config.productionTip = false
Vue.prototype.$echarts = echarts
/* eslint-disable no-new */
new Vue({
	el: '#app',
	router,
	components: {
		App
	},
	store,
	template: '<App/>',

})

router.beforeEach((to, from, next) => {
	if (to.meta.title) {
		document.title = to.meta.title
	}
	// console.log(to.path, from.path)
	next()
})
